<!--
	作者：956911785@qq.com
	时间：2019年8月13日14:41:51
	描述：积分兑换记录
-->
<template>
    <div style="width:100%;height:540px;"> 
        <Tetable ref="tdtable" height="450" :columns="columns9" type="post" :paramiters="tj" :serverUrl="serverUrl"></Tetable>
    </div> 
</template>
<script>
	import sflq from "./sflq";
    export default {
    	name: "jfdhjlss",
    	props: {
    		tj:{
    			type: Object
    		},	
    	},
        data () {
            return {
            	serverUrl:"/host/readbook/jfsc/search_jfdhjl.html",
                columns9: [
                    {
                        type: 'index',
                        width: 60,
                        title: '序号',
                        align: 'center'
                    },{
                        title: '学生姓名',
                        key: 'SNAME',
                        align: 'center',
                    },{
                        title: '年级',
                        key: 'NJ',
                        align: 'center', 
                    }, {
                        title: '班级',
                        key: 'BJ',
                        align: 'center', 
                    }, {
                        title: '所用积分',
                        key: 'USEJF',
                        align: 'center', 
                    }, {
                        title: '兑换的商品数量',
                        key: 'DHSL',
                        align: 'center', 
                    }, {
                        title: '是否领取',
                        key: 'SFLQT',
                        align: 'center', 
                        render: (h, params) => {
                        	
                        	return h(sflq, { 
                        		props: {
                                    sflq: params.row.SFLQ+"",
                                    sflqt: params.row.SFLQT,
                                },
	                        	on: { 
	                        		
	                        		lingqu: () => {
	                        			var dhjlid=params.row.DHJLID;
	                        			this.$Modal.confirm({
						                    title: '警告',
						                    content: '请确定是否领取！！！',
						                    onOk: () => {
						                    	this.$http.get("/host/readbook/jfsc/lingqu_jfdhjl.html?dhjlid="+dhjlid)
												.then(datas => {
													if(datas.result){		
														this.$Message.info('领取成功');
														this.$refs.tdtable.load();
													}else{
														this.$Message.info(datas.msg);
														this.$refs.tdtable.load();
													}
													
												});
						                    }
						                });
	                        		}
									
	                        	} 
                        	})

                        }
                    },  {
                        title: '兑换时间',
                        key: 'DHSJ',
                        align: 'center', 
                    }
                ],
            }
        },
        computed: {
		},
		methods: {
			load(){
				this.$refs.tdtable.load();
			},
	    },
		mounted() {
		},
		watch:{
		},
		components: {
			sflq
		}
    }
</script>


<style scoped="scoped">
	
	.ivu-table-wrapper {
		border:none;
	}
	
	.toolstipdiv{
		width: '100%';
		overflow: 'hidden';
		textOverflow: 'ellipsis';
		whiteSpace: 'normal';
		wordBreak: 'break-all';
		color:'#fff';
		text-align: center;
	}
	.toolstipdiv:hover{
		background:rgb(63, 193, 201);
	}
	
	.ivu-tooltip-rel label:hover{
		color:#0023FB;
	}
	
	.tablediv{
		height: '40px';
		overflow:'hidden';
		line-height: '40px';
	}
</style>



